package cn.doctor.assistant.pad.ui.huifang;

import android.os.Bundle;

import com.blunderer.materialdesignlibrary.fragments.ViewPagerWithTabsFragment;
import com.blunderer.materialdesignlibrary.handlers.ViewPagerHandler;

/**
 * Created by jiaolf on 2016/3/21.
 * 回访
 */
public class RecallFragment extends ViewPagerWithTabsFragment {
    //isFollowed 0：已回访， 1：待回访
    RecallListFragment mToRecallFragment;
    RecallListFragment mRecalledFragment;

    public static RecallFragment newInstance() {
        return new RecallFragment();
    }


    @Override
    protected boolean expandTabs() {
        return false;
    }

    @Override
    public int defaultViewPagerPageSelectedPosition() {
        return 0;
    }

    @Override
    public ViewPagerHandler getViewPagerHandler() {
        {
            mRecalledFragment = new RecallListFragment();
            Bundle bundle = new Bundle();
            bundle.putInt("isFollowed", 0);
            mRecalledFragment.setArguments(bundle);
        }

        {
            mToRecallFragment = new RecallListFragment();
            Bundle bundle = new Bundle();
            bundle.putInt("isFollowed", 1);
            mToRecallFragment.setArguments(bundle);
        }

        return new ViewPagerHandler(getActivity())
                .addPage("待回访列表", mToRecallFragment)
                .addPage("已回访列表", mRecalledFragment);
    }

}
